package com.ae.geese;

import com.ae.Quackable;
import com.ae.observer.Observable;
import com.ae.observer.Observer;

public class GooseAdaptor implements Quackable {

	Goose goose ; 
	Observable observable ; 
	
	public GooseAdaptor(Goose goose) {
		observable = new Observable(this);
		this.goose = goose ; 
	}
	
	@Override
	public void quack() {
		goose.honk();
		notifyObserver(); 

	}

	@Override
	public void registerObserver(Observer o) {
		observable.registerObserver(o);
		
	}
	@Override
	public void notifyObserver() {
		observable.notifyObserver();		
	}


}
